#pragma once
#include <cstdint>

template<typename T>
class CStrongHandle
{
public:
    CStrongHandle() : m_handle(0) {}

    bool IsValid() const { return m_handle != 0; }

    T* Get() const { return reinterpret_cast<T*>(m_handle); }

    T* operator->() const { return Get(); }

    T& operator*() const { return *Get(); }

    void Reset() { m_handle = 0; }

private:
    uintptr_t m_handle;
};